﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ICM_Collect_Request_Urgent.aspx.cs" Inherits="KPIS.GERP.GIMS.APP.APP_UI.Edit_Form.ICM_Collect_Request_Urgent" %>
<%@ Register Assembly="BasicFrame.WebControls.BasicDatePicker" Namespace="BasicFrame.WebControls" TagPrefix="BDP" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<%@ Register TagPrefix="custom" Namespace="KPIS.Customs.UI" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title></title>
    <link rel="StyleSheet" href="../../Styles/StyleSheet.css" type="text/css">  
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true" >
        </asp:ScriptManager>
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
            <script type="text/javascript" src="../../Scripts/Common.js"></script>
            <script type="text/javascript">
                var show_date = false;
                
                function onTextChangeGeneral(sender) {
                    if (sender.get_value() == "") {
                        sender.set_text("");
                    }
                }
                
                function GetRadWindow() {
                    var oWindow = null;
                    if (window.radWindow)
                        oWindow = window.RadWindow; //Will work in Moz in all cases, including clasic dialog      
                    else if (window.frameElement.radWindow)
                        oWindow = window.frameElement.radWindow; //IE (and Moz as well)      
                    return oWindow;
                }

                function CloseWindow() {
                    GetRadWindow().Close();
                }

                Sys.Application.add_load(setCalendarTable);
                
                function setCalendarTable() {
                    var tooltip = $find("<%= ToolTipDate.ClientID %>");
                    var calendar = $find("<%= CalendarDate.ClientID %>");                       
                    var fastNavigation = calendar._getFastNavigation();
                    fastNavigation.OnToday =
                    function()
                    {
                        var today = new Date;
                        var date = [today.getFullYear(), today.getMonth()+ 1, today.getDate()];
                        calendar.selectDate(date, true);
                        fastNavigation.Popup.Hide();  
                        var all_date = date.toString().split(",");
                        var year = parseInt(all_date[0]) + 543;
                        var month = all_date[1];
                        var day = all_date[2];
                        if (day.length == 1) {
                            day = '0' + day;
                        }
                        if (month.length == 1) {
                            month = '0' + month;
                        }

                        var maskText = $find("<%= txtDate.ClientID %>");
                        maskText.set_value(day + month + year);
                        tooltip.hide();
                    }
                }

                function OnDateClick(calendarInstance, args) {
                    var tooltip = $find("<%= ToolTipDate.ClientID %>");
                    var fastNavigation = calendarInstance._getFastNavigation();
                    var date = args.get_renderDay().get_date().toString();
                    var all_date = date.split(",");
                    var year = parseInt(all_date[0]) + 543;
                    var month = all_date[1];
                    var day = all_date[2];
                    if (day.length == 1) {
                        day = '0' + day;
                    }
                    if (month.length == 1) {
                        month = '0' + month;
                    }

                    var maskText = $find("<%= txtDate.ClientID %>");
                    maskText.set_value(day + month + year);
                    tooltip.hide();
                }
                
                function OnCalendarViewChanged(sender, step) {
                    var year = parseInt(sender.FocusedDate[0]) + 543;
                    var month = sender.FocusedDate[1];
                    document.getElementById("CalendarDate_Title").innerHTML = changeMonthNumberToName(month) + " " + year; 
                } 
                
                function OnClientBeforeHide(sender, eventArgs) {
                    if (show_date == true)
                    {
                        eventArgs.set_cancel(true);
                        show_date = false;
                    }
                }
                
                function OnClientBeforeShow(sender, eventArgs) {
                    show_date = true;
                }
                
                function OnClientBeforeShowDate(sender, eventArgs) {
                    show_date = false;
                }
                
                function CloseToolTip() {
                    show_date = false;
                    var controller = Telerik.Web.UI.RadToolTipController.getInstance();
                    var tooltip = $find("<%= RadToolTip1.ClientID %>");
                    if (tooltip) {
                        tooltip.hide();
                    }
                }
            </script>
        </telerik:RadCodeBlock>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" BackgroundPosition="None" Skin="Outlook">
        </telerik:RadAjaxLoadingPanel>
        <telerik:RadAjaxManager runat="server" ID="RadManager1">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="LinkButton2">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="LinkButton2" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>

        <table style="width: 1000px; height: 100%" cellpadding="0" cellspacing="0">
            <tr valign="top">
                <td valign="top">
                    <asp:Panel ID="panelCommand" runat="server">
                        <div class="bigModuleFull">
                            <div class="bigModuleBottomFull">
                                <table cellpadding="0" cellspacing="0">
                                    <tr class="command-list" width="100%">
                                        <td class="command-item" style="border: none">
                                            <asp:LinkButton ID="Forward" runat="server" CssClass="LinkButton">
                                                <img style="border:0px;vertical-align:middle;" alt="" src="../Image/Grid/AddRecord.gif" />&nbsp;&nbsp;ส่งต่อ
                                            </asp:LinkButton>
                                        </td>
                                        <td class="command-item">
                                            <asp:LinkButton ID="Reject" runat="server" CssClass="LinkButton">
                                                <img style="border:0px;vertical-align:middle;" alt="" src="../Image/Grid/Delete.gif" />&nbsp;&nbsp;ตีกลับ
                                            </asp:LinkButton>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </div>    
                        <telerik:RadToolTip runat="server" ID="RadToolTip1" Width="580px" Height="70px" TargetControlID="Forward" ShowEvent="OnClick" 
                        IsClientID="true" Animation="Fade" Position="BottomRight" Skin="Default" Modal="true" HideEvent="FromCode" OnClientBeforeHide="OnClientBeforeHide" OnClientBeforeShow="OnClientBeforeShow">
                            <table width="100%">
                                <tr>
                                    <td align="right" width="98%" colspan="2">
                                        <asp:LinkButton ID="LinkButton2" runat="server" CssClass="LinkButton" OnClientClick="CloseToolTip();">
                                            <img alt="" src="../Image/Icon/close_tooltip.gif" style="border:0px;vertical-align:middle;" />
                                        </asp:LinkButton>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <table width="98%" cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td width="20px">
                                                </td>
                                                <td>
                                                    <table>
                                                        <tr>
                                                            <td>
                                                                วันที่รายการ :
                                                            </td>
                                                            <td>
                                                                <table>
                                                                    <tr>
                                                                        <td>
                                                                            <telerik:RadMaskedTextBox ID="txtDate" runat="server" Mask=" ##/##/####" Width="75px" TextWithLiterals=" //" SelectionOnFocus="SelectAll" ValidationGroup="ValSentTo"></telerik:RadMaskedTextBox>
                                                                        </td>
                                                                        <td>
                                                                            <asp:LinkButton ID="LinkButton1" runat="server" CssClass="LinkButton">
                                                                                <img alt="" src="../Image/Icon/Calendar.gif" style="border:0px;vertical-align:middle;" />
                                                                            </asp:LinkButton>
                                                                            <telerik:RadToolTip ID="ToolTipDate" runat="server" Animation="None" HideEvent="LeaveToolTip" Position="MiddleRight" ShowEvent="OnClick" Skin="Telerik" OnClientBeforeShow="OnClientBeforeShowDate"
                                                                            TargetControlID="LinkButton1" Modal="true">
                                                                                <telerik:RadCalendar id="CalendarDate" runat="server" TitleFormat="MMMM yyyy" EnableMultiSelect="false" UseRowHeadersAsSelectors="false" UseColumnHeadersAsSelectors="false" DayCellToolTipFormat="dddd, dd MMMM, yyyy" NavigationPrevToolTip="เดือนก่อนหน้า" NavigationNextToolTip="เดือนถัดไป" FastNavigationNextToolTip="3 เดือนถัดไป" FastNavigationPrevToolTip="3 เดือนก่อนหน้า">
                                                                                    <ClientEvents OnDateClick="OnDateClick" OnCalendarViewChanged="OnCalendarViewChanged"></ClientEvents>
                                                                                    <FastNavigationSettings EnableTodayButtonSelection="true" TodayButtonCaption="ไปที่วันนี้" OkButtonCaption="เปลี่ยน" CancelButtonCaption="ยกเลิก" />
                                                                                </telerik:RadCalendar>
                                                                            </telerik:RadToolTip>
                                                                            &nbsp;<label id="Label2" runat="server"><font color="red">*</font></label>
                                                                        </td>
                                                                        <td>
                                                                            <asp:RequiredFieldValidator ID="ValReqDate" runat="server" ControlToValidate="txtDate" SetFocusOnError="True" Display="Dynamic" ErrorMessage="* กรุณาระบุวันที่ *" ValidationGroup="ValSentTo"></asp:RequiredFieldValidator>
                                                                            <asp:CustomValidator ID="ValDate" runat="server" ControlToValidate="txtDate" ErrorMessage="กรุณาระบุวันที่ให้ถูกต้อง" Display="Dynamic" ClientValidationFunction="validateDate" ValidationGroup="ValSentTo"></asp:CustomValidator>
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>            
                                            </tr>
                                            <tr>
                                                <td width="20px">
                                                </td>
                                                <td>
                                                    <table>
                                                        <tr>
                                                            <td width="70px" valign="top">
                                                                ผู้ดำเนินการ :
                                                            </td>
                                                            <td>
                                                                <telerik:RadComboBox runat="server" ID="cbOperationName" Height="230px" Width="440px" AllowCustomText="true" ShowDropDownOnTextboxClick="true"
                                                                EmptyMessage=".. พิมพ์ที่นี่เพื่อช่วยค้นหา .." MarkFirstMatch="false" ShowMoreResultsBox="true" EnableLoadOnDemand="true" 
                                                                EnableVirtualScrolling="true" HighlightTemplatedItems="true" OnItemsRequested="cbOperationName_ItemsRequested"
                                                                OnClientTextChange="onTextChangeGeneral" ZIndex="9001" ValidationGroup="ValSentTo" EnableItemCaching="true">
                                                                    <HeaderTemplate>
                                                                        <table class="font-label" cellpadding="0" cellspacing="0">
                                                                            <tr>
                                                                                <td width="100px" align="center"><b>หน่วยงาน</b></td>
                                                                                <td width="100px" align="center"><b>ชื่อ-สกุล</b></td>
                                                                                <td width="100px" align="center"><b>ตำแหน่ง</b></td>
                                                                                <td width="100px" align="center"><b>ระดับ</b></td>
                                                                            </tr>
                                                                        </table>
                                                                    </HeaderTemplate>
                                                                    <ItemTemplate>
                                                                        <asp:Table id="tableOperationName" runat="server" CssClass="font-label" CellPadding="0" CellSpacing="0">
                                                                        </asp:Table>
                                                                    </ItemTemplate>
                                                                </telerik:RadComboBox>
                                                                &nbsp;<label id="Label14" runat="server"><font color="red">*</font></label>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                            </td>
                                                            <td>
                                                                <asp:RequiredFieldValidator ID="ValcbOperationName" runat="server" ControlToValidate="cbOperationName" SetFocusOnError="True" Display="Dynamic" ErrorMessage="* กรุณาระบุผู้ดำเนินการ *" ValidationGroup="ValSentTo"></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="2" align="center">
                                                    <asp:Button ID="btnSendTo" runat="server" Text="ส่ง" Width="100px" OnClick="btnSendTo_Click" ValidationGroup="ValSentTo"/>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </telerik:RadToolTip>  
                        <telerik:RadToolTip runat="server" ID="RadToolTip2" Width="400px" Height="120px" TargetControlID="Reject" ShowEvent="OnClick"
                        IsClientID="false" Animation="Fade" Position="BottomRight" Skin="Default" Modal="true" ManualClose="true">
                            <table width="100%">
                                <tr>
                                    <td>
                                        <table width="98%" cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td width="20px">
                                                </td>
                                                <td>
                                                    <table>
                                                        <tr>
                                                            <td width="100px" valign="top">
                                                                สาเหตุที่ตีกลับ :
                                                            </td>
                                                            <td>
                                                                <telerik:RadTextBox ID="txtReject" runat="server" Skin="Outlook" Width="200" ToolTip="กรุณาใส่ข้อความที่ต้องการค้นหา" TextMode="MultiLine" Height="100"></telerik:RadTextBox>
                                                                &nbsp;<label id="Label1" runat="server"><font color="red">*</font></label>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                            </td>
                                                            <td>
                                                                <asp:RequiredFieldValidator ID="ValtxtReject" runat="server" ControlToValidate="txtReject" SetFocusOnError="True" Display="Dynamic" ErrorMessage="* กรุณาระบุสาเหตุทีตีกลับ *" ValidationGroup="ValReject" ></asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="2" align="center">
                                                    <asp:Button ID="btnSendBack" runat="server" Text="ส่ง" Width="100px" OnClick="btnSendBack_Click" ValidationGroup="ValReject" />
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </telerik:RadToolTip>    
                    </asp:Panel>
                </td>
            </tr>
        </table>    
        <asp:Panel ID="panelAll" runat="server">
            <div class="exampleWrapper">
                <telerik:RadTabStrip ID="RadTabStrip1" SelectedIndex="0" runat="server" MultiPageID="RadMultiPage1" Skin="Vista" CssClass="multiPage" CausesValidation="false"> 
                    <Tabs>
                        <telerik:RadTab runat="server" Text="ข้อมูลหลัก" Value="Detail" Selected="true">
                        </telerik:RadTab>
                        <telerik:RadTab runat="server" Text="รายการพัสดุ" Value="Item">
                        </telerik:RadTab>
                        <telerik:RadTab runat="server" Text="เอกสารแนบ" Value="File">
                        </telerik:RadTab>
                        <telerik:RadTab runat="server" Text="ประวัติตีกลับ" Value="History">
                        </telerik:RadTab>
                    </Tabs>
                </telerik:RadTabStrip>
                <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" CssClass="pageView">
                    <telerik:RadPageView ID="RadPageView1" runat="server">
                        <asp:Panel ID="panel_Detail" runat="server">
                            <asp:Panel ID="panelData_Detail" runat="server">
                                <div class="bigModuleFull" align="left">
                                    <div class="bigModuleBottomFull">
                                        <asp:Panel ID="panelHeaderList" runat="server">
                                            <div class="header-grid">
                                                <asp:Label ID="lblHeaderList" runat="server" Text="ข้อมูลหลัก"></asp:Label>
                                            </div>
                                        </asp:Panel>
                                        <asp:Panel CssClass="panelList" runat="server" ID="panelList_Detail" ScrollBars="Auto">
                                            <table width="98%">
                                                <tr>
                                                    <td valign="top">
                                                        <table width="98%" cellpadding="0" cellspacing="0">
                                                            <tr>
                                                                <td width="30px">
                                                                </td>
                                                                <td>
                                                                    <div class="formList-detail">
                                                                        <table>
                                                                            <tr>
                                                                                <td width = "150px" valign="top">
                                                                                    ประเภทปี :
                                                                                </td>
                                                                                <td>
                                                                                    <asp:Label runat="server" ID="lblYearType"></asp:Label>
                                                                                </td>
                                                                            </tr>
                                                                        </table>
                                                                    </div>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td width="30px">
                                                                </td>
                                                                <td>
                                                                    <div class="formList-detail">
                                                                        <table>
                                                                            <tr>
                                                                                <td width = "150px">
                                                                                    ปี :
                                                                                </td>
                                                                                <td>
                                                                                    <asp:Label runat="server" ID="lblYear"></asp:Label>
                                                                                </td>
                                                                            </tr>
                                                                        </table>
                                                                    </div> 
                                                                </td>
                                                            </tr>  
                                                            <tr>
                                                                <td width="30px">
                                                                </td>
                                                                <td>
                                                                    <div class="formList-detail">
                                                                        <table>
                                                                            <tr>
                                                                                <td width = "150px" valign="top">
                                                                                    หน่วยงาน :
                                                                                </td>
                                                                                <td>
                                                                                    <asp:Label runat="server" ID="lblJobSite"></asp:Label>
                                                                                </td>
                                                                            </tr>
                                                                        </table>
                                                                    </div> 
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td width="30px">
                                                                </td>
                                                                <td>
                                                                    <div class="formList-detail">
                                                                        <table>
                                                                            <tr>
                                                                                <td width = "150px" valign="top">
                                                                                    ประเภทการจัดหา :
                                                                                </td>
                                                                                <td>
                                                                                    <asp:Label runat="server" ID="lblPurchaseType"></asp:Label>
                                                                                </td>
                                                                            </tr>
                                                                        </table>
                                                                    </div> 
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td width="30px">
                                                                </td>
                                                                <td>
                                                                    <div class="formList-detail">
                                                                        <table>
                                                                            <tr>
                                                                                <td width = "150px" valign="top">
                                                                                    วันที่รายการ :
                                                                                </td>
                                                                                <td>
                                                                                    <asp:Label runat="server" ID="lblDate"></asp:Label>
                                                                                </td>
                                                                            </tr>
                                                                        </table>
                                                                    </div> 
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td width="30px">
                                                                </td>
                                                                <td>
                                                                    <div class="formList-detail">
                                                                        <table>
                                                                            <tr>
                                                                                <td width = "150px" valign="top">
                                                                                    เรื่อง :
                                                                                </td>
                                                                                <td>
                                                                                    <asp:Label runat="server" ID="lblName"></asp:Label>
                                                                                </td>
                                                                            </tr>
                                                                        </table>
                                                                    </div> 
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td width="30px">
                                                                </td>
                                                                <td>
                                                                    <div class="formList-detail">
                                                                        <table>
                                                                            <tr>
                                                                                <td width = "150px" valign="top">
                                                                                    เหตุผลในการจัดหา :
                                                                                </td>
                                                                                <td>
                                                                                    <asp:Label runat="server" ID="lblReason"></asp:Label>
                                                                                </td>
                                                                            </tr>
                                                                        </table>
                                                                    </div> 
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                </tr>
                                            </table>
                                        </asp:Panel>
                                    </div>
                                </div>
                            </asp:Panel>
                        </asp:Panel>
                    </telerik:RadPageView>
                    <telerik:RadPageView ID="RadPageView2" runat="server">
                        <asp:Panel ID="panel_Item" runat="server">
                            <table style="width: 98%;" cellpadding="0" cellspacing="0">
                                <tr valign="top">
                                    <td valign="top">
                                        <asp:Panel ID="panelData_Item" runat="server">
                                            <div class="bigModuleFull">
                                                <div class="bigModuleBottomFull">
                                                    <asp:Panel ID="panelHeaderList2" runat="server">
                                                        <div class="header-grid">
                                                            <asp:Label ID="Label5" runat="server" Text="ข้อมูลรายการพัสดุ"></asp:Label>
                                                        </div>
                                                    </asp:Panel>
                                                    <asp:Panel CssClass="panelGrid" ID="panelGrid_Item" runat="server" ScrollBars="Auto">
                                                        <div align="Left">
                                                            <telerik:RadGrid ID="Grid_Item" runat="server" AllowFilteringByColumn="true" 
                                                                AllowMultiRowSelection="True" AllowPaging="false" AllowSorting="True" 
                                                                AutoGenerateColumns="False" CssClass="RadGrid" EnableAJAX="True" 
                                                                GridLines="None" OnItemCommand="Grid_Item_ItemCommand" 
                                                                OnItemDataBound="Grid_Item_ItemDataBound" ShowFooter="true" 
                                                                ShowStatusBar="false" Skin="Outlook" Width="95%" >
                                                                <mastertableview allowmulticolumnsorting="true" grouploadmode="Client" 
                                                                nomasterrecordstext="&lt;div align=center&gt;&lt;font color=gray&gt;&lt;i&gt;ไม่มีข้อมูล&lt;/i&gt;&lt;/font&gt;&lt;/div&gt;" 
                                                                width="100%" DataKeyNames="Seq">
                                                                    <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                                                                    <Columns>
                                                                        <telerik:GridBoundColumn AutoPostBackOnFilter="true" 
                                                                            CurrentFilterFunction="Contains" DataField="InfoSource.Name" 
                                                                            FilterControlWidth="100%" Groupable="true" 
                                                                            GroupByExpression="InfoSource.Name Group By InfoSource.Seq" 
                                                                            HeaderText="แหล่งเงิน" ShowFilterIcon="false" UniqueName="InfoSource.Name" 
                                                                            Visible="false">
                                                                            <HeaderStyle HorizontalAlign="Center" Width="150px" />
                                                                            <ItemStyle HorizontalAlign="Left" />
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridBoundColumn AutoPostBackOnFilter="true" 
                                                                            CurrentFilterFunction="Contains" DataField="InfoExpense.Name" 
                                                                            FilterControlWidth="100%" Groupable="true" 
                                                                            GroupByExpression="InfoExpense.Name Group By InfoExpense.Seq" 
                                                                            HeaderText="รายจ่าย" ShowFilterIcon="false" UniqueName="InfoExpense.Name" 
                                                                            Visible="false">
                                                                            <HeaderStyle HorizontalAlign="Center" Width="150px" />
                                                                            <ItemStyle HorizontalAlign="Left" />
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridBoundColumn AutoPostBackOnFilter="true" 
                                                                            CurrentFilterFunction="Contains" DataField="InfoRule.Name" 
                                                                            FilterControlWidth="100%" Groupable="true" 
                                                                            GroupByExpression="InfoRule.Name Group By InfoRule.Seq" 
                                                                            HeaderText="ระเบียบการจัดหา" ShowFilterIcon="false" UniqueName="InfoRule.Name" 
                                                                            Visible="false">
                                                                            <HeaderStyle HorizontalAlign="Center" Width="150px" />
                                                                            <ItemStyle HorizontalAlign="Left" />
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridBoundColumn AutoPostBackOnFilter="true" 
                                                                            CurrentFilterFunction="Contains" DataField="InfoOperationExpense.InfoOperation.Name" 
                                                                            FilterControlWidth="100%" Groupable="true" 
                                                                            GroupByExpression="InfoOperationExpense.InfoOperation.Name Group By InfoOperationExpense.InfoOperation.Seq" 
                                                                            HeaderText="อนุมัติหลักการ" ShowFilterIcon="false" UniqueName="InfoOperationExpense.InfoOperation.Name" 
                                                                            Visible="false">
                                                                            <HeaderStyle HorizontalAlign="Center" Width="150px" />
                                                                            <ItemStyle HorizontalAlign="Left" />
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridBoundColumn AutoPostBackOnFilter="true" 
                                                                            CurrentFilterFunction="Contains" DataField="InfoProjectExpense.InfoProject.Name" 
                                                                            FilterControlWidth="100%" Groupable="true" 
                                                                            GroupByExpression="InfoProjectExpense.InfoProject.Name Group By InfoProjectExpense.InfoProject.Seq" 
                                                                            HeaderText="แผนงบประมาณ" ShowFilterIcon="false" UniqueName="InfoProjectExpense.InfoProject.Name" 
                                                                            Visible="false">
                                                                            <HeaderStyle HorizontalAlign="Center" Width="150px" />
                                                                            <ItemStyle HorizontalAlign="Left" />
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridTemplateColumn AutoPostBackOnFilter="true" 
                                                                            CurrentFilterFunction="Contains" DataField="Name" FilterControlWidth="100%" 
                                                                            HeaderText="รายการ" ShowFilterIcon="false" SortExpression="Name" 
                                                                            UniqueName="Name">
                                                                            <HeaderStyle HorizontalAlign="Center" Width="250px" />
                                                                            <ItemStyle HorizontalAlign="Left" />
                                                                            <ItemTemplate>
                                                                                <asp:HyperLink ID="lkName" runat="server" NavigateUrl="#" Text='<%# Eval("Name") %>'></asp:HyperLink>
                                                                            </ItemTemplate>
                                                                        </telerik:GridTemplateColumn>
                                                                        <telerik:GridBoundColumn AutoPostBackOnFilter="true" 
                                                                            CurrentFilterFunction="Contains" DataField="Descr" FilterControlWidth="100%" 
                                                                            HeaderStyle-HorizontalAlign="Center" HeaderText="รายละเอียด" 
                                                                            ShowFilterIcon="false" UniqueName="Descr">
                                                                            <HeaderStyle HorizontalAlign="Center" />
                                                                            <ItemStyle HorizontalAlign="Left" />
                                                                            <FooterStyle HorizontalAlign="Right" />
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridBoundColumn AutoPostBackOnFilter="true" 
                                                                            CurrentFilterFunction="Contains" DataField="Qty" DataFormatString="{0:N0}" 
                                                                            FilterControlWidth="100%" HeaderStyle-HorizontalAlign="Center" 
                                                                            HeaderText="จำนวน" ShowFilterIcon="false" UniqueName="Qty">
                                                                            <HeaderStyle HorizontalAlign="Center" Width="50px" />
                                                                            <ItemStyle HorizontalAlign="Left" />
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridBoundColumn AutoPostBackOnFilter="true" 
                                                                            CurrentFilterFunction="Contains" DataField="InfoItem.InfoUnit.Name" 
                                                                            FilterControlWidth="100%" HeaderStyle-HorizontalAlign="Center" 
                                                                            HeaderText="หน่วย" ShowFilterIcon="false" UniqueName="InfoItem.InfoUnit.Name">
                                                                            <HeaderStyle HorizontalAlign="Center" Width="30px" />
                                                                            <ItemStyle HorizontalAlign="Left" />
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridTemplateColumn AutoPostBackOnFilter="true" 
                                                                            CurrentFilterFunction="Contains" DataField="Price" FilterControlWidth="100%" 
                                                                            HeaderText="ราคาประมาณการ&lt;br&gt;ต่อหน่วย(บาท)" ShowFilterIcon="false" 
                                                                            UniqueName="Price">
                                                                            <ItemTemplate> 
                                                                                <asp:Label ID="lblPrice" runat="server" Text='<%# Eval("Price", "{0:N2}") %>'> </asp:Label> 
                                                                            </ItemTemplate>
                                                                            <HeaderStyle HorizontalAlign="Center" Width="120px" />
                                                                            <ItemStyle HorizontalAlign="Right" />
                                                                            <FooterStyle HorizontalAlign="Right" />
                                                                            <FooterTemplate>
                                                                                <asp:Label ID="lblTotalPrice" runat="server" CssClass="font-label" 
                                                                                    Font-Bold="true" Width="100px"> </asp:Label>
                                                                            </FooterTemplate>
                                                                        </telerik:GridTemplateColumn>
                                                                        <telerik:GridBoundColumn DataField="InfoItem.Seq" 
                                                                            HeaderStyle-HorizontalAlign="Center" UniqueName="InfoItem.Seq" Visible="false">
                                                                            <HeaderStyle HorizontalAlign="Center" />
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridBoundColumn DataField="InfoExpense.Seq" 
                                                                            HeaderStyle-HorizontalAlign="Center" UniqueName="InfoExpense.Seq" 
                                                                            Visible="false">
                                                                            <HeaderStyle HorizontalAlign="Center" />
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridBoundColumn DataField="InfoSource.Seq" 
                                                                            HeaderStyle-HorizontalAlign="Center" UniqueName="InfoSource.Seq" 
                                                                            Visible="false">
                                                                            <HeaderStyle HorizontalAlign="Center" />
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridBoundColumn DataField="InfoRule.Seq" 
                                                                            HeaderStyle-HorizontalAlign="Center" UniqueName="InfoRule.Seq" 
                                                                            Visible="false">
                                                                            <HeaderStyle HorizontalAlign="Center" />
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridBoundColumn DataField="InfoOperationExpense.InfoOperation.Seq" 
                                                                            HeaderStyle-HorizontalAlign="Center" UniqueName="InfoOperationExpense.InfoOperation.Seq" 
                                                                            Visible="false">
                                                                            <HeaderStyle HorizontalAlign="Center" />
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridBoundColumn DataField="InfoProjectExpense.InfoProject.Seq" 
                                                                            HeaderStyle-HorizontalAlign="Center" UniqueName="InfoProjectExpense.InfoProject.Seq" 
                                                                            Visible="false">
                                                                            <HeaderStyle HorizontalAlign="Center" />
                                                                        </telerik:GridBoundColumn>
                                                                    </Columns>
                                                                </mastertableview>
                                                                <clientsettings enablerowhoverstyle="true">
                                                                    <selecting allowrowselect="True" />
                                                                </clientsettings>
                                                            </telerik:RadGrid>
                                                            <telerik:RadToolTipManager ID="TipItemDetail" runat="server" Animation="None" 
                                                                Height="450px" HideEvent="ManualClose" OnAjaxUpdate="OnAjaxUpdateItemDetail" 
                                                                Position="MiddleRight" ShowEvent="OnClick" Skin="Telerik" Width="456px">
                                                            </telerik:RadToolTipManager>
                                                        </div>
                                                        <br />
                                                    </asp:Panel>
                                                </div>
                                            </div>
                                        </asp:Panel>
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                    </telerik:RadPageView>
                    <telerik:RadPageView ID="RadPageView3" runat="server">
                        <asp:Panel ID="panel_File" runat="server">
                            <table style="width: 98%;" cellpadding="0" cellspacing="0">
                                <tr valign="top">
                                    <td valign="top">
                                        <asp:Panel ID="panelData_File" runat="server">
                                            <div class="bigModuleFull">
                                                <div class="bigModuleBottomFull">
                                                    <asp:Panel ID="panel4" runat="server">
                                                        <div class="header-grid">
                                                            <asp:Label ID="Label3" runat="server" Text="ข้อมูลเอกสารแนบ"></asp:Label>
                                                        </div>
                                                    </asp:Panel>
                                                    <asp:Panel CssClass="panelGrid" ID="panelGrid_File" runat="server" ScrollBars="Auto">
                                                        <div align="Left">
                                                            <telerik:RadGrid CssClass="RadGrid" ID="Grid_File" runat="server" AllowFilteringByColumn="true"
                                                            AllowMultiRowSelection="True" AllowPaging="false" AllowSorting="True"
                                                            AutoGenerateColumns="False" EnableAJAX="True"
                                                            GridLines="None" ShowStatusBar="false" Skin="Outlook" Width="95%"
                                                            OnItemCommand="Grid_File_ItemCommand">
                                                                <MasterTableView GroupLoadMode="Client" DataKeyNames="Seq" ClientDataKeyNames="Seq" AllowMultiColumnSorting="true" Width="100%" NoMasterRecordsText="<div align=center><font color=gray><i>ไม่มีข้อมูล</i></font></div>">
                                                                    <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                                                                    <Columns>
                                                                        <telerik:GridTemplateColumn DataField="Name"  HeaderText="ชื่อไฟล์"
                                                                            AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false"
                                                                            FilterControlWidth="100%" UniqueName="Name" SortExpression="Name">
                                                                            <HeaderStyle HorizontalAlign="Center" />
                                                                            <ItemStyle HorizontalAlign="Left" />
                                                                            <ItemTemplate>
                                                                                <asp:HyperLink ID="lkName" runat="server" Text='<%# Eval("Name") %>' NavigateUrl='<%# "../Form/Sys_File_View.aspx?table=ICM_PRE_PURCHASE_REQUEST_FILE&field=ICM_PPR_FILE_SEQ&seq=" + Eval("Seq") %>' Target="_blank"></asp:HyperLink>
                                                                            </ItemTemplate>
                                                                        </telerik:GridTemplateColumn>
                                                                        <telerik:GridBoundColumn DataField="Extension" 
                                                                            AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false"
                                                                            FilterControlWidth="100%"
                                                                            HeaderStyle-HorizontalAlign="Center" HeaderText="นามสกุลไฟล์" 
                                                                            UniqueName="Extension">
                                                                            <HeaderStyle HorizontalAlign="Center" Width="100px" />
                                                                            <ItemStyle HorizontalAlign="Center" />
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridBoundColumn DataField="Seq" 
                                                                            HeaderStyle-HorizontalAlign="Center" UniqueName="Seq" 
                                                                            Visible="false">
                                                                            <HeaderStyle HorizontalAlign="Center" />
                                                                        </telerik:GridBoundColumn>
                                                                    </Columns>
                                                                </MasterTableView>
                                                                <ClientSettings EnableRowHoverStyle="true" >
                                                                    <Selecting AllowRowSelect="True" />
                                                                </ClientSettings>
                                                            </telerik:RadGrid>
                                                        </div>
                                                        <br />
                                                    </asp:Panel>
                                                </div>
                                            </div>
                                        </asp:Panel>
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                    </telerik:RadPageView>
                    <telerik:RadPageView ID="RadPageView4" runat="server">
                        <asp:Panel ID="panel_Reject" runat="server">
                            <table style="width: 98%;" cellpadding="0" cellspacing="0">
                                <tr valign="top">
                                    <td valign="top">
                                        <asp:Panel ID="panelData_Reject" runat="server">
                                            <div class="bigModuleFull">
                                                <div class="bigModuleBottomFull">
                                                    <asp:Panel ID="panel5" runat="server">
                                                        <div class="header-grid">
                                                            <asp:Label ID="Label4" runat="server" Text="ข้อมูลประวัติการตีกลับ"></asp:Label>
                                                        </div>
                                                    </asp:Panel>
                                                    <asp:Panel CssClass="panelGrid" ID="panelGrid_Reject" runat="server" ScrollBars="Auto">
                                                        <div align="Left">
                                                            <telerik:RadGrid CssClass="RadGrid" ID="Grid_Reject" runat="server" AllowFilteringByColumn="true"
                                                            AllowMultiRowSelection="True" AllowPaging="false" AllowSorting="True"
                                                            AutoGenerateColumns="False" EnableAJAX="True"
                                                            GridLines="None" ShowStatusBar="false" Skin="Outlook" Width="95%"
                                                            OnItemCommand="Grid_Reject_ItemCommand">
                                                                <MasterTableView GroupLoadMode="Client" DataKeyNames="Seq" ClientDataKeyNames="Seq" AllowMultiColumnSorting="true" Width="100%" NoMasterRecordsText="<div align=center><font color=gray><i>ไม่มีข้อมูล</i></font></div>">
                                                                    <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                                                                    <Columns>
                                                                <telerik:GridBoundColumn DataField="Reject_no" 
                                                                    AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false"
                                                                    FilterControlWidth="100%"
                                                                    HeaderStyle-HorizontalAlign="Center" HeaderText="ครั้งที่" 
                                                                    UniqueName="Reject_no">
                                                                    <HeaderStyle HorizontalAlign="Center" Width="50px" />
                                                                    <ItemStyle HorizontalAlign="Center" />
                                                                </telerik:GridBoundColumn>
                                                                <telerik:GridBoundColumn DataField="Date" 
                                                                    AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false"
                                                                    FilterControlWidth="100%"
                                                                    HeaderStyle-HorizontalAlign="Center" HeaderText="วันที่ตีกลับ" 
                                                                    UniqueName="Date" DataFormatString="{0:dd/MM/yyyy}">
                                                                    <HeaderStyle HorizontalAlign="Center" />
                                                                    <ItemStyle HorizontalAlign="Center" />
                                                                </telerik:GridBoundColumn>
                                                                <telerik:GridBoundColumn DataField="InfoEmp.Name" 
                                                                    AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false"
                                                                    FilterControlWidth="100%"
                                                                    HeaderStyle-HorizontalAlign="Center" HeaderText="ผู้ตีกลับ" 
                                                                    UniqueName="InfoEmp.Name">
                                                                    <HeaderStyle HorizontalAlign="Center" />
                                                                    <ItemStyle HorizontalAlign="Center" />
                                                                </telerik:GridBoundColumn>
                                                                <telerik:GridBoundColumn DataField="Reason" 
                                                                    AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false"
                                                                    FilterControlWidth="100%"
                                                                    HeaderStyle-HorizontalAlign="Center" HeaderText="หมายเหตุ" 
                                                                    UniqueName="Reason">
                                                                    <HeaderStyle HorizontalAlign="Center" />
                                                                    <ItemStyle HorizontalAlign="Center" />
                                                                </telerik:GridBoundColumn>
                                                                <telerik:GridBoundColumn DataField="Seq" 
                                                                    HeaderStyle-HorizontalAlign="Center" UniqueName="Seq" 
                                                                    Visible="false">
                                                                    <HeaderStyle HorizontalAlign="Center" />
                                                                </telerik:GridBoundColumn>
                                                            </Columns>
                                                                </MasterTableView>
                                                                <ClientSettings EnableRowHoverStyle="true" >
                                                                    <Selecting AllowRowSelect="True" />
                                                                </ClientSettings>
                                                            </telerik:RadGrid>
                                                        </div>
                                                        <br />
                                                    </asp:Panel>
                                                </div>
                                            </div>
                                        </asp:Panel>
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                    </telerik:RadPageView>
                </telerik:RadMultiPage>
            </div>
        </asp:Panel>
    </form>
</body>
</html>
